<?php
//前台公用类库
class HomeAction extends AllAction{
	//构造函数
    public function _initialize(){
		parent::_initialize();
		$channelTree = $this->getChannelTree();
		$this->assign('channelTree',$channelTree);
        $this->assign($this->Lable_Style());
    }
    
    //获得频道数组
    public function getChannelTree(){
    	$list = F("_ppvod/listtree");
    	$arr = array();
    	foreach($list as $lval){
    		$key = $lval['list_dir'];
    		$id = $lval['list_id'];
    		if($lval['son']){
    			foreach($lval['son'] as $sonval){
    				$id .= ','.$sonval['list_id'];
    			}
    		}
    		$arr[$key] = explode(',',$id);
    	}
    	return $arr;
    }
}
?>